<%+cbi/valueheader%>

<script type="text/javascript">//<![CDATA[
	function act_update_core(btn, dataname)
	{
		btn.disabled = true;
		btn.value = '<%:正在更新核心...%>';
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "unblockneteasemusic", "update_core")%>',
			status.ret,
			function(x, status)
			{
				var s = document.getElementById(dataname + '-status');
				if (s)
				{
					if(status.ret == "0")
						s.innerHTML = "<font color='green'>" + "<%:当前已是最新版本%>" + "</font>";
					else if (status.ret == "1")
						s.innerHTML = "<font color='red'>" + "<%:无法检测最新版本%>" + "</font>";
					else if(status.ret == "2")
						s.innerHTML = "<font color='red'>" + "<%:更新失败，请稍后重试%>" + "</font>";
					else
						s.innerHTML = "<font color='green'>" + "<%:更新成功，当前版本号：%>" + status.ret + "</font>";
				}
				btn.disabled = false;
				btn.value = '<%:点此更新核心%>';
			}
		);
		return false;
	}
//]]></script>


<input type="button" class="btn cbi-button cbi-input-reload" value="<%:点此更新核心%>" onclick="return act_update_core(this, '<%=self.option%>')" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>

<%+cbi/valuefooter%>
